home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / libray / libcommon / transform.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-09  |  2.1 KB  |  78 lines

  1. /*
  2.  * transform.h
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * transform.h,v 4.1 1994/08/09 07:55:20 explorer Exp
  17.  *
  18.  * transform.h,v
  19.  * Revision 4.1  1994/08/09  07:55:20  explorer
  20.  * Bump version to 4.1
  21.  *
  22.  * Revision 1.1.1.1  1994/08/08  04:52:02  explorer
  23.  * Initial import.  This is a prerelease of 4.0.6enh3, or 4.1 possibly.
  24.  *
  25.  * Revision 4.0  91/07/17  14:32:33  kolb
  26.  * Initial version.
  27.  * 
  28.  */
  29. #ifndef TRANSFORM_H
  30. #define TRANSFORM_H
  31.  
  32. typedef voidstar TransRef;
  33. typedef TransRef TransCreateFunc();
  34.  
  35. /*
  36.  * Transformation 'matrix'.
  37.  */
  38. typedef struct RSMatrix {
  39.     Float matrix[3][3];        /* Rotation matrix */
  40.     Vector translate;        /* Translation */
  41. } RSMatrix;
  42.  
  43. typedef struct {
  44.     TransRef    (*create)();        /* Create it... */
  45.     void        (*propagate)();        /* Propagate changes to parameters */
  46. } TransMethods;
  47.  
  48. /* 
  49.  * Transformation structure
  50.  */
  51. typedef struct Trans {
  52.     TransRef tr;            /* transform data */
  53.     TransMethods *methods;        /* transform methods */
  54.     ExprAssoc *assoc;        /* animated parameters */
  55.     short    animated;        /* is the transformation animated? */
  56.     RSMatrix trans,        /* object space --> world space */
  57.          itrans;    /* worldspace --> object space */
  58.     struct Trans *next, *prev;
  59. } Trans;
  60.  
  61. extern void    MatrixMult(), MatrixCopy(), MatrixInit(), MatrixInvert(),
  62.         TransCopy(), TransInit(), TransInvert(),
  63.         TransCompose(),
  64.         VecTransform(), PointTransform(), NormalTransform();
  65.  
  66. extern Trans    *TransCreate();
  67.  
  68. extern RSMatrix    *MatrixCreate();
  69.  
  70. void        RotationMatrix(), TranslationMatrix(),
  71.         ScaleMatrix(), ArbitraryMatrix(), CoordSysTransform();
  72. extern Float    RayTransform();
  73.  
  74. extern Float    Lipschitz();
  75. extern int      MatrixEigenvalues(), MatrixScaling(), Uniform();
  76.  
  77. #endif /* TRANSFORM_H */
  78.